home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2000 February / Macworld (2000-02).dmg / Cool Extras! / WallBall Screen Saver / intro.dxr / 00010_Loop Until Next Frame is Available.ls < prev    next >
Encoding:
Text File  |  1999-11-11  |  3.3 KB  |  63 lines

  1. property WhichFrame, loopMarker, loopFrame, waitAction
  2.  
  3. on getPropertyDescriptionList
  4.   markList = []
  5.   markListPopDown = ["{Next Marker}"]
  6.   nextList = ["{Next Marker}"]
  7.   prevList = []
  8.   numMarkers = the number of lines in the labelList
  9.   repeat with i = 1 to numMarkers
  10.     L = (the labelList).line[i]
  11.     add(markList, L)
  12.     add(markListPopDown, L)
  13.   end repeat
  14.   repeat with e = 1 to markListPopDown.count
  15.     if getAt(markListPopDown, e) = EMPTY then
  16.       markListPopDown.deleteAt(e)
  17.     end if
  18.   end repeat
  19.   totalMarkers = markListPopDown.count
  20.   if markListPopDown[totalMarkers] = EMPTY then
  21.     markListPopDown.deleteAt(totalMarkers)
  22.   end if
  23.   repeat with r = 1 to markListPopDown.count
  24.     if the frame > getAt(markListPopDown, r).marker then
  25.       add(prevList, getAt(markListPopDown, r))
  26.     end if
  27.   end repeat
  28.   deleteAt(prevList, 1)
  29.   if prevList <> [] then
  30.     description = [#waitAction: [#comment: "Loop Type:", #format: #symbol, #range: [#LoopOnCurrentFrame, #LoopToSpecifiedFrame, #LoopToSpecifiedMarker], #default: #LoopOnCurrentFrame], #loopFrame: [#comment: "Loop to Frame:", #format: #integer, #default: 1], #loopMarker: [#comment: "Loop to Marker:", #format: #string, #range: prevList, #default: getLast(prevList)]]
  31.     return description
  32.   else
  33.     description = [#waitAction: [#comment: "Loop Type:", #format: #symbol, #range: [#LoopOnCurrentFrame, #LoopToSpecifiedFrame], #default: #LoopOnCurrentFrame], #loopFrame: [#comment: "Loop to Frame:", #format: #integer, #default: 1]]
  34.     return description
  35.   end if
  36. end
  37.  
  38. on exitFrame me
  39.   if not frameReady(the frame + 1) then
  40.     the idleLoadMode = 2
  41.     preLoad(the frame + 1)
  42.     the idleLoadMode = 0
  43.     case waitAction of
  44.       #LoopOnCurrentFrame:
  45.         go(the frame)
  46.       #LoopToSpecifiedFrame:
  47.         go(loopFrame)
  48.       #LoopToSpecifiedMarker:
  49.         go(loopMarker)
  50.     end case
  51.   else
  52.     nothing()
  53.   end if
  54. end
  55.  
  56. on getBehaviorDescription
  57.   return "What this behavior does:" & RETURN & RETURN & "Instructs the playback head to wait for media used in the next frame.   Use this in movies that are authored to stream over the Internet, where media in the next frame may not be available yet.  When the media in the next frame becomes available, the playback head will continue to the next frame." & RETURN & RETURN & RETURN & "How to use:" & RETURN & RETURN & "1. Drag the behavior to the script channel of the score in the frame that should serve as the end of the looping sequence." & RETURN & RETURN & "2. Select a 'Loop Type.'" & RETURN & RETURN & "Options include 'LoopOnCurrentFrame' (the default) and 'LoopToSpecifiedFrame.'  Additionally, if one or more markers exist prior to the frame the behavior is in, 'LoopToSpecifiedMarker' becomes a third looping option." & RETURN & RETURN & "3. Assign a destination to loop to while waiting for streaming media." & RETURN & RETURN & "This is only required when selecting a 'Loop Type' that requires a particular frame or marker to loop to." & RETURN & RETURN & "Note:  This behavior should be used for Shockwave only."
  58. end
  59.  
  60. on getBehaviorTooltip
  61.   return "Use this to loop the playback head" & RETURN & "until media in the subsequent frame" & RETURN & "is available for use." & RETURN & RETURN & "To use, drop behavior on the script" & RETURN & "channel of the score in the frame" & RETURN & "that will serve as the end of the" & RETURN & "looping sequence."
  62. end
  63.